<?php

namespace App\Http\Requests\Products;

use App\Http\Requests\ApiRequest;
use Illuminate\Foundation\Http\FormRequest;

/**
 * @property string product_id
 * @property string store_id
 */
class ShowProductReviewRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'language'      => 'required|string|max:' . self::MAX_STRING,
            'product_id'    => 'required|int|min:1|max:' . self::MAX_INT,
            'store_id'      => 'nullable|int|min:0|max:' . self::MAX_INT,
        ];
    }
}
